# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=xf86-input-mtrack
_pkgver=0.5.0
pkgver=${_pkgver}_git20220713
_commitid=247a824f937b4beda3f5f11d7d9000ffd03b5616
pkgrel=0
pkgdesc="xorg driver for multitouch trackpads"
url="https://github.com/p2rkw/xf86-input-mtrack"
arch="all"
license="GPL-2.0-or-later"
makedepends="mtdev-dev xorg-server-dev libtool"
source="$pkgname-$_commitid.tar.gz::https://github.com/p2rkw/xf86-input-mtrack/archive/$_commitid.tar.gz
	fix-time64.patch"
builddir="$srcdir/"$pkgname-$_commitid

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-tools
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	#install -Dm644 10-mtrack.conf "$pkgdir"/usr/share/X11/xorg.conf.d/10-mtrack.conf
}

sha512sums="
35d14acbc1479375e87043818fc7df007cbc1e88a1d6477c79d56866f15bc99bcfefe19469bde5aff6fe420629282ec45e052f0fb07c33a275b09e39bd56cb85  xf86-input-mtrack-247a824f937b4beda3f5f11d7d9000ffd03b5616.tar.gz
6eb21849a39d2db2003cc4222879591d5b67b346e564e3e96fe1e109ae3071cceebdd56768ac82bd516bbc4566d7010069fc18ff7cb97f2bf1d005fde3088b7d  fix-time64.patch
"
